<template>
  <div class="goods-bgk-box">
    <div class="goods-box-header">
      <div @click="goBack" class="back">
        <van-icon name="arrow-left" />
      </div>
      <a href="javascript:void (0)" @click="tabsColor(1)" class="change-active">
        <p>{{ $t('h.B030') }}</p>
        <span v-if="active === 1" />
      </a>
      <a href="javascript:void (0)" @click="tabsColor(2)" class="change-active">
        <p>{{ $t('h.B031') }}</p>
        <span v-if="active === 2" />
      </a>
      <a href="javascript:void (0)" @click="tabsColor(3)" class="change-active">
        <p>{{ $t('h.B032') }}</p>
        <span v-if="active === 3" />
      </a>
    </div>
    <div class="safe" />
    <div class="goods-nav-image">
      <van-swipe :autoplay="3000" indicator-color="white" @change="onChange">
        <van-swipe-item v-for="(item, index) in goods" :key="index">
          <div class="product-item">
            <div :key="index" class="item">
              <img :src="item" alt="" />
            </div>
          </div>
        </van-swipe-item>
        <template #indicator>
          <div class="dot">
            <div
              v-for="(item, index) in parseInt(goods.length)"
              :key="index"
              :class="{ active: index === currentIndex }"
              class="custom-indicator"
            />
          </div>
        </template>
      </van-swipe>
    </div>
    <div class="goods-item">
      <div class="content-desc">
        {{ productData?.name }}
      </div>
      <div class="goods-home">
        <span
          >{{ $t('h.B034') }} <i>${{ price }}</i></span
        >
        <!--        <span>{{$t('h.B035') }}：2100</span>-->
      </div>
      <!--      <div class="good-image">-->
      <!--        <p class="good-title">{{$t('h.B036') }}</p>-->
      <!--        <div class="good-title">-->
      <!--          <div class="btn-title-goods">{{$t('h.B037') }}</div>-->
      <!--          <div class="btn-title-goods">{{$t('h.B038') }}</div>-->
      <!--        </div>-->
      <!--        <p class="good-title margin-bottom">{{$t('h.B039') }}</p>-->
      <!--        <div class="box-image">-->
      <!--          <div class="box" :class="{'box-checked':checkedBox===1}">-->
      <!--            <img src="../../assets/image/81uqiMuZBKL._AC_UL1500_.jpg" alt="">-->
      <!--          </div>-->
      <!--          <div class="box">-->
      <!--            <img src="../../assets/image/81uqiMuZBKL._AC_UL1500_.jpg" alt="">-->
      <!--          </div>-->
      <!--          <div class="box">-->
      <!--            <img src="../../assets/image/81uqiMuZBKL._AC_UL1500_.jpg" alt="">-->
      <!--          </div>-->
      <!--          <div class="box">-->
      <!--            <img src="../../assets/image/81uqiMuZBKL._AC_UL1500_.jpg" alt="">-->
      <!--          </div>-->
      <!--        </div>-->
      <!--      </div>-->

      <div class="good-cell-box">
        <div class="label width-50">{{ $t('h.B040') }}</div>
        <div class="content">
          {{ $t('h.B041') }}
        </div>
        <!--        <div class="icon"></div>-->
      </div>
      <div class="good-cell-box-new" @click="showYunfiDialog">
        <div class="label" style="display: flex; align-items: center">
          {{ $t('h.B042') }}
        </div>
        <div class="icon">
          {{ $t('h.B043') }}
          <van-icon name="arrow" />
        </div>
      </div>
      <div class="good-cell-box-new">
        <div class="label" style="display: flex; align-items: center">
          {{ $t('h.B044') }}
        </div>
        <div class="icon">$0.00</div>
      </div>
      <div class="good-cell-box-new" id="userReviews">
        <div class="label" style="display: flex; align-items: center">
          {{ $t('h.B045') }}
        </div>
        <van-stepper button-size="22" v-model="shopCardModel.num" :step="1" />
      </div>
      <div class="good-cell-chat">
        <div class="top">
          <span>{{ $t('h.B046') + '(' + reviewInfo?.total + ')' }}</span>
          <van-icon name="arrow" />
        </div>
        <!--        <div class="content">-->
        <!--          <span>{{$t('h.B047') }}：1200</span>-->
        <!--          <span>{{$t('h.B048') }}：1200</span>-->
        <!--          <span>{{$t('h.B049') }}：1200</span>-->
        <!--          <span>{{$t('h.B050') }}：32</span>-->
        <!--        </div>-->
      </div>
      <template v-if="reviewInfo">
        <div class="goods-chat" v-for="item in reviewInfo?.data">
          <div class="chat-top">
            <img :src="item.avatar" alt="" />
            <span>{{ item.email }}</span>
          </div>
          <div class="goods-rate">
            <van-rate :size="18" v-model="item.star" color="#002FFF" />
            <!--            <span>{{ $t('h.B051') }}</span>-->
          </div>
          <div class="good-content">
            {{ item.content }}
          </div>
          <div class="time">
            <!--            <span>{{ $t('h.B052') }} >> </span>-->
            <span> {{ new Date(item.createtime).toLocaleDateString() }} </span>
          </div>
        </div>
      </template>
      <div class="store-shop">
        <div
          class="store-top"
          @click="$router.push({ path: '/store/' + shopInfo?.id })"
        >
          <el-avatar :src="shopInfo?.avatar" :size="50" />
          <div class="right">
            <p>{{ shopInfo?.title }}</p>
            <!--            <p> {{ $t('h.B053') }} : 99% </p>-->
          </div>
          <a class="shop-nov" href="javascript:void (0)">{{ $t('h.B054') }} </a>
        </div>
        <div class="store-bottom" id="productDesc">
          <div class="box">
            <p>{{ shopInfo?.count }}</p>
            <p>{{ $t('h.B055') }}</p>
          </div>
          <span />
          <div class="box">
            <p>{{ shopInfo?.followers }}</p>
            <p>{{ $t('h.B056') }}</p>
          </div>
          <span />
          <div class="box">
            <p>{{ shopInfo?.sales_volume }}</p>
            <p>{{ $t('h.B057') }}</p>
          </div>
        </div>
      </div>

      <div class="product-info">
        <div class="title">{{ $t('h.B058') }}</div>
        <div class="content" v-html="productData.content">
          <!--          {{ $t('h.B059') }}-->
        </div>
      </div>
    </div>
    <Footer></Footer>
    <div class="goods-submit">
      <div class="left">
        <div class="item-left" @click="addFavorite">
          <span class="icon">
            <van-icon name="star" v-if="showFavIcon" color="#fcd53f" />
            <van-icon name="star-o" v-else />
          </span>
          <p class="nav-list">{{ $t('h.B064') }}</p>
        </div>
        <div class="item-left" style="display: none">
          <span class="icon"><van-icon name="service-o" /></span>
          <p class="nav-list">{{ $t('h.B065') }}</p>
        </div>
        <div
          @click="bottomShow = true"
          class="item-left"
          style="border-left: 1px solid #f6f6f6"
        >
          <span class="icon"><van-icon name="cart-circle-o" /></span>
          <p class="nav-list">{{ $t('h.B066') }}</p>
        </div>
        <!--        <van-grid  icon-size="16" :border="false" :column-num="3">-->
        <!--          <van-grid-item icon="star-o" >-->
        <!--            <template slot="icon">-->
        <!--              <span class="icon"><van-icon name="star-o" /></span>-->
        <!--            </template>-->
        <!--            <template slot="text">-->
        <!--              <span class="start">收藏</span>-->
        <!--            </template>-->
        <!--          </van-grid-item>-->
        <!--          <van-grid-item icon="star-o" >-->
        <!--            <template slot="icon">-->
        <!--              <span class="icon"><van-icon name="service-o" /></span>-->
        <!--            </template>-->
        <!--            <template slot="text">-->
        <!--              <span class="start">客服</span>-->
        <!--            </template>-->
        <!--          </van-grid-item>-->
        <!--          <van-grid-item @click="bottomShow=true" icon="star-o" >-->
        <!--            <template slot="icon">-->
        <!--              <span class="icon"><van-icon name="cart-circle-o" /></span>-->
        <!--            </template>-->
        <!--            <template slot="text">-->
        <!--              <span class="start">购物车</span>-->
        <!--            </template>-->
        <!--          </van-grid-item>-->
        <!--        </van-grid>-->
      </div>
      <div @click="handleCreateOrder" class="submit">
        <p>$ {{ totalPrice }}</p>
        <p>{{ $t('h.B067') }}</p>
      </div>
    </div>
    <van-popup v-model="yunfeiVisible" position="bottom" round>
      <van-picker
        show-toolbar
        :cancel-button-text="$t('h.CANCEL')"
        :confirm-button-text="$t('h.CONFIRM')"
        :columns="yunfeiColumns"
        @cancel="yunfeiVisible = false"
        @confirm="yunfeiVisible = false"
      />
    </van-popup>
    <van-popup v-model="bottomShow" position="bottom" closeable round>
      <div class="prop-bottom">
        <div class="title">{{ $t('h.B068') }}</div>
        <div class="goods">
          <div class="left">
            <img :src="shopCardModel?.mainimage" alt="" />
          </div>
          <div class="right">
            <!--            <p class="content">{{ $t('h.B069') }} </p>-->
            <!--            <p class="content">{{ shopCardModel?.name }} </p>-->
            <p class="price">$ {{ shopCardModel?.price }}</p>
            <div class="content">
              {{ $t('h.B070') }} ：x{{ shopCardModel?.num }}
            </div>
          </div>
        </div>
        <div class="button-goods">
          <p class="title-goods">{{ shopCardModel?.name }}</p>
          <!--          <div class="btn-goods">-->
          <!--            <a class="btn-chose" href="javascript:void (0)">{{$t('h.B072') }}</a>-->
          <!--            <a class="btn-chose" href="javascript:void (0)">{{$t('h.B072') }}</a>-->
          <!--            <a class="btn-chose" href="javascript:void (0)">{{$t('h.B072') }}</a>-->
          <!--            <a class="btn-chose" href="javascript:void (0)">{{$t('h.B072') }}</a>-->
          <!--          </div>-->
        </div>
        <!--        <div class="goods-popup-box">-->
        <!--          <p class="popup-title">{{$t('h.B073') }}</p>-->
        <!--          <div class="popup-box">-->
        <!--            <div class="box active">-->
        <!--              <img src="@/assets/image/81mXds2xD1L._AC_UL1500_.jpg" alt="">-->
        <!--            </div>-->
        <!--            <div class="box">-->
        <!--              <img src="@/assets/image/81mXds2xD1L._AC_UL1500_.jpg" alt="">-->
        <!--            </div>-->
        <!--            <div class="box">-->
        <!--              <img src="@/assets/image/81mXds2xD1L._AC_UL1500_.jpg" alt="">-->
        <!--            </div>-->
        <!--            <div class="box">-->
        <!--              <img src="@/assets/image/81mXds2xD1L._AC_UL1500_.jpg" alt="">-->
        <!--            </div>-->
        <!--            <div class="box">-->
        <!--              <img src="@/assets/image/81mXds2xD1L._AC_UL1500_.jpg" alt="">-->
        <!--            </div>-->
        <!--          </div>-->
        <!--        </div>-->
        <div class="bottom-popup-plus">
          <span>{{ $t('h.B074') }}</span>
          <van-stepper
            button-size="24"
            key="inner-stepper"
            v-model="shopCardModel.num"
          />
        </div>
        <van-button
          style="margin-top: 15px"
          color="#002FFF"
          @click="addCart"
          type="primary"
          block
          >{{ $t('h.B075') }}
        </van-button>
      </div>
    </van-popup>
  </div>
</template>

<script>
import Footer from '@/components/flooter/index';
import { getGoodsDetail } from '@/api/apiFox';
import { Toast } from 'vant';
import { mapActions, mapGetters } from 'vuex';

export default {
  components: {
    Footer,
  },
  data() {
    return {
      shopCardModel: {
        num: 0,
      },
      yunfeiColumns: [this.$t('h.B043')],
      yunfeiVisible: false,
      price: null,
      productData: {},
      shopInfo: null,
      active: 1,
      checkedBox: 1,
      bottomShow: false,
      currentIndex: 0,
      value: 1,
      goods: [],
      reviewInfo: null,
    };
  },
  computed: {
    ...mapGetters(['userInfo', 'favoriteProducts']),
    showFavIcon() {
      return this.favoriteProducts.some((item) => item.id === this.productData.id)
        ? true
        : false;
    },
    totalPrice() {
      return (this.shopCardModel.num * this.shopCardModel.price).toFixed(2);
    },
  },
  mounted() {
    this.getDetail();
  },
  methods: {
    ...mapActions(['updateUser']),
    ...mapActions(['addFavoriteProduct']),
    ...mapActions('order', ['setOrder']),
    handleCreateOrder() {
      let _goods = JSON.parse(JSON.stringify(this.shopCardModel));
      this.setOrder([
        {
          shopId: _goods.shopId,
          shopName: _goods.shopName,
          goods: [
            {
              ..._goods,
              checked: false,
            },
          ],
          checked: false,
          checkes: [
            {
              ..._goods,
            },
          ],
        },
      ]).then(() => {
        this.$router.push({
          path: '/orderChecked',
          query: {
            auto: true,
          },
        });
      });
    },
    addFavorite() {
      this.updateUser().then((res) => {
        if (res?.uid) {
          this.addFavoriteProduct({
            ...this.productData,
            shopId: this.shopCardModel.shopId,
          });
        } else {
          this.$router.push('/login');
        }
      });
    },
    showYunfiDialog() {
      this.yunfeiVisible = true;
    },
    addCart() {
      this.$store.dispatch(
        'addShopCart',
        JSON.parse(JSON.stringify(this.shopCardModel))
      );
      Toast.success(this.$t('h.ADD_SHOP_CART_SUCCESS'));
      this.bottomShow = false;
    },
    getDetail() {
      getGoodsDetail({
        ids: this.$route.query.id,
        shop_id: this.$route.query.shop,
      }).then((res) => {
        this.productData = res.data.product;
        this.goods = res.data.product.subimage.split(',');
        this.price = res.data.product.price;
        this.reviewInfo = res.data.review;
        this.shopInfo = res.data.shopinfo;
        this.shopCardModel = {
          ...res.data.product,
          num: 1,
          shopId: res.data.shopinfo.id,
          shopName: res.data.shopinfo.title,
        };
      });
    },
    goBack() {
      this.$router.go(-1);
    },
    onChange(index) {
      this.currentIndex = index;
    },
    tabsColor(index) {
      this.active = index;
      // 获取对应iddom
      switch (index) {
        case 1: {
          window.scrollTo({
            top: 0,
            behavior: 'smooth',
          });
          break;
        }
        case 2: {
          const tabsId = document.querySelector(`#userReviews`);
          if (tabsId) {
            window.scrollTo({
              top: tabsId.offsetTop,
              behavior: 'smooth',
            });
          }
          break;
        }
        case 3: {
          const tabsId = document.querySelector(`#productDesc`);
          if (tabsId) {
            window.scrollTo({
              top: tabsId.offsetTop,
              behavior: 'smooth',
            });
          }
        }
      }
      const tabsId = document.querySelector(`#tabs${index}`);
      // 判断进行平滑滚动
      if (tabsId) {
        window.scrollTo({
          top: tabsId.offsetTop,
          behavior: 'smooth',
        });
      }
    },
  },
};
</script>

<style scoped lang="scss">
.goods-bgk-box {
  width: 100%;
  min-height: 100vh;
  scroll-behavior: smooth !important;
  height: 100%;
  background: #fff;

  .goods-box-header {
    width: 100%;
    background: #fff;
    height: 45px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 999;

    .back {
      width: 45px;
      height: 45px;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 22px;
    }

    .change-active {
      width: 100px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      box-sizing: border-box;
      padding: 12px 0 0 0;

      p {
        height: 35px;
        text-align: center;
        width: 100%;
        font-size: 14px;
        font-weight: 600;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
      }

      span {
        margin-top: -20px;
        display: flex;
        width: 70px;
        height: 2.5px;
        border-radius: 2px;
        background: #002fff;
      }
    }
  }

  .safe {
    width: 100%;
    height: 45px;
  }

  .goods-nav-image {
    width: 100%;
    height: 440px;
    overflow: hidden;

    .product-item {
      width: 100%;
      height: 400px;

      .item {
        display: flex;
        justify-content: center;
        img {
          height: 400px;
          object-fit: scale-down;
        }
      }
    }
  }

  .goods-item {
    width: 100%;
    min-height: 50px;
    padding: 0 3%;
    box-sizing: border-box;

    .content-desc {
      width: 100%;
      font-size: 14px;
      margin-bottom: 10px;
    }

    .goods-home {
      width: 100%;
      border-top: 1px solid #f6f6f6;
      border-bottom: 1px solid #f6f6f6;
      height: 45px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      span {
        font-size: 14px;
        color: #aaa;

        i {
          font-size: 14px;
          color: #002fff;
          font-style: normal;
        }
      }
    }

    .good-image {
      width: 100%;
      min-height: 100px;
      border-bottom: 1px solid #f6f6f6;

      .good-title {
        width: 100%;
        font-size: 14px;
        min-height: 20px;
        line-height: 20px;
        margin-top: 8px;
        margin-bottom: 8px;
        display: flex;
        flex-wrap: wrap;

        .btn-title-goods {
          padding: 4px 10px;
          background: #002fff;
          margin-right: 10px;
          margin-bottom: 10px;
          text-align: center;
          color: #fff;

          font-size: 12px;
          border-radius: 5px;
        }
      }

      .margin-bottom {
        margin-top: 15px;
        font-size: 12px;
      }

      .box-image {
        width: 100%;
        min-height: 50px;
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        padding: 0 0 15px 0;
        box-sizing: border-box;

        .box-checked {
          box-sizing: border-box;
          border: 2px solid #002fff !important;
        }

        .box {
          margin-right: 10px;
          width: 40px;
          border: 1px solid #f6f6f6;
          border-radius: 5px;
          height: 40px;
          display: flex;
          justify-content: center;
          align-items: center;

          img {
            width: 35px;
            height: 35px;
            border-radius: 5px;
          }
        }
      }
    }

    .good-cell-box {
      width: 100%;
      min-height: 50px;
      border-bottom: 1px solid #f6f6f6;
      display: flex;
      justify-content: space-between;
      padding: 10px 0 10px 0;
      box-sizing: border-box;
      gap: 5px;

      .width-50 {
        width: 60px;
      }

      .width-80 {
        width: 80px;
      }

      .width-150 {
        width: 150px;
      }

      .label {
        font-size: 12px !important;
      }

      .content {
        width: 100%;
        font-size: 12px;
      }

      .icon {
        font-size: 14px;
        display: flex;
        align-items: center;
      }
    }

    .good-cell-box-new {
      width: 100%;
      min-height: 50px;
      border-bottom: 1px solid #f6f6f6;
      display: flex;
      justify-content: space-between;
      padding: 10px 0 10px 0;
      box-sizing: border-box;
      gap: 5px;

      .label {
        font-size: 12px !important;
      }

      .icon {
        font-size: 14px;
        display: flex;
        gap: 5px;
        align-items: center;
      }
    }

    .good-cell-chat {
      width: 100%;
      min-height: 80px;
      padding: 10px 0;
      box-sizing: border-box;

      .top {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 20px;
        font-size: 14px;
      }

      .content {
        display: flex;
        padding: 15px 0;
        box-sizing: border-box;
        flex-wrap: wrap;
        border-bottom: 1px solid #f6f6f6;

        span {
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 6px 8px;
          font-size: 12px;
          background: #f6f6f6;
          border-radius: 15px;
          color: #666666;
          margin-right: 10px;
          margin-bottom: 5px;
        }
      }
    }

    .goods-chat {
      width: 100%;
      min-height: 200px;
      padding: 10px 0 10px 0;
      border-bottom: 1px solid #f6f6f6;
      box-sizing: border-box;

      .chat-top {
        width: 100%;
        height: 40px;
        display: flex;
        align-items: center;

        img {
          height: 30px;
          border-radius: 50%;
        }

        span {
          margin-left: 10px;
          font-size: 14px;
          color: #333;
        }
      }

      .goods-rate {
        width: 100%;
        height: 20px;

        span {
          font-size: 12px;
          color: #002fff;
          font-weight: 500;
          margin-left: 10px;
        }
      }

      .good-content {
        margin-top: 15px;
        font-size: 12px;
      }

      .time {
        width: 100%;
        font-size: 10px;
        height: 40px;
        color: #aaa;
        line-height: 40px;
      }
    }

    .store-shop {
      width: 100%;
      height: 150px;
      border-radius: 5px;
      border: 1px solid #f6f6f6;

      .store-top {
        width: 100%;
        height: 80px;
        border-bottom: 1px solid #f6f6f6;
        padding: 3%;
        box-sizing: border-box;
        display: flex;
        align-items: center;

        .right {
          flex: 1;
          height: 80px;
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          padding: 20px 0;
          box-sizing: border-box;
          margin-left: 15px;

          p {
            width: 100%;
          }

          p:nth-child(1) {
            font-size: 14px;
            font-weight: 600;
          }

          p:nth-child(2) {
            font-size: 10px;
          }
        }

        .shop-nov {
          display: flex;
          margin-left: 10px;
          justify-items: center;
          align-items: center;
          padding: 5px 10px;
          border-radius: 10px;
          border: 1px solid #002fff;
          font-size: 10px;
          justify-content: center;
          background: #fcf2e2;
          color: #002fff;
        }
      }

      .store-bottom {
        padding: 10px 0 0 0;
        box-sizing: border-box;
        width: 100%;
        height: 60px;
        display: flex;
        justify-content: space-around;
        align-items: center;

        .box {
          text-align: center;
          font-size: 12px;

          p:nth-child(1) {
            margin-top: 15px;
            font-weight: 700;
          }

          p:nth-child(2) {
            margin-top: 5px;
          }
        }

        span {
          display: flex;
          width: 1px;
          height: 20px;
          background: #eee;
        }
      }
    }

    .product-info {
      width: 100%;
      min-height: 100px;
      margin-top: 20px;

      .title {
        font-size: 14px;
        margin-top: 20px;
      }

      .content {
        font-size: 14px;
        margin-top: 15px;
        line-height: 20px;
      }
    }
  }

  .goods-submit {
    width: 100%;
    height: 60px;
    position: fixed;
    background: #fff;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    z-index: 1000;

    .left {
      width: 100%;
      height: 60px;
      padding: 0 0 10px 0;
      box-sizing: border-box;
      display: flex;

      .item-left {
        width: 50%;
        height: 60px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        padding: 15px 0;
        box-sizing: border-box;

        .icon {
          font-size: 18px;
        }

        .nav-list {
          width: 100%;
          text-align: center;
          font-size: 12px;
        }
      }
    }

    .submit {
      width: 200px;
      height: 60px;
      background: #002fff;
      padding: 3%;
      box-sizing: border-box;

      p:nth-child(1) {
        font-size: 14px;
        color: #fff;
        width: 100%;
        margin-top: 5px;
        text-align: center;
      }

      p:nth-child(2) {
        font-size: 14px;
        width: 100%;
        text-align: center;
        color: #fff;
      }
    }
  }

  .prop-bottom {
    width: 100%;
    min-height: 300px;
    padding: 3% 5%;
    box-sizing: border-box;

    .title {
      width: 100%;
      height: 40px;
      font-size: 16px;
      text-align: center;
      line-height: 40px;
    }

    .goods {
      width: 100%;
      margin: 15px 0;
      height: 80px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .left {
        width: 60px;
        height: 60px;
        padding: 3px;
        border-radius: 5px;
        border: 1px solid #f6f6f6;

        img {
          width: 60px;
          height: 60px;
        }
      }

      .right {
        width: 100%;
        min-height: 60px;
        margin-left: 10px;

        .price {
          font-size: 18px;
          color: #002fff;
        }

        .content {
          width: 100%;
          font-size: 12px;
          color: #333;
          white-space: normal;
          word-break: break-word;
        }
      }
    }

    .button-goods {
      width: 100%;

      .title-goods {
        width: 100%;
        margin-top: 10px;
        font-size: 14px;
      }

      .btn-goods {
        width: 100%;

        display: flex;
        flex-wrap: wrap;

        .btn-chose {
          display: block;
          padding: 5px 10px;
          background: #002fff;
          color: #fff;
          margin-right: 10px;
          text-align: center;
          border-radius: 5px;
          font-size: 14px;
          margin-top: 10px;
        }
      }
    }

    .goods-popup-box {
      width: 100%;
      margin-top: 15px;

      .popup-title {
        width: 100%;
        font-size: 14px;
      }

      .popup-box {
        width: 100%;
        display: flex;
        padding: 10px 0;
        box-sizing: border-box;
        flex-wrap: wrap;

        .box {
          height: 50px;
          width: 50px;
          margin-right: 10px;
          border-radius: 5px;
          border: 1px solid #f6f6f6;
          padding: 2px;
          box-sizing: border-box;

          img {
            height: 40px;
            width: 40px;
          }
        }

        .active {
          border: 2px solid #002fff;
        }
      }
    }

    .bottom-popup-plus {
      width: 100%;
      height: 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      span {
        font-size: 14px;
      }
    }
  }
}

.dot {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;

  .custom-indicator {
    margin: 0 3px;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: #c6c6c6;
    opacity: 0.6;
  }

  .active {
    opacity: 1;
    background: #002fff;
  }
}

.start {
  font-size: 12px;
}

.icon {
  font-size: 18px;
}
</style>
